package com.example.project;

import android.os.Bundle;
import android.app.Activity;
import android.graphics.PixelFormat;
import android.view.Menu;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class Splash_patrocinadores extends Activity {
	
	public void onAttachedToWindow() {
        super.onAttachedToWindow();
        Window window = getWindow();
        window.setFormat(PixelFormat.RGBA_8888);
    }
	
	
   

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash_patrocinadores);
		CountDown _tik;
	    // It delay the screen for 2.5 seconds and after that switch to YourNextActivity
	    _tik=new CountDown(5000,5000,this,Project_Menu.class);
	    _tik.start();
	    StartAnimations();
	    
	}
	 private void StartAnimations() {
	        Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
	        anim.reset();
	        LinearLayout l=(LinearLayout) findViewById(R.id.lin_lay);
	        l.clearAnimation();
	        l.startAnimation(anim);
	 
	        anim = AnimationUtils.loadAnimation(this, R.anim.translate);
	        anim.reset();
	        ImageView iv = (ImageView) findViewById(R.id.logo);
	        iv.clearAnimation();
	        iv.startAnimation(anim);
	 
	    }
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_splash_patrocinadores, menu);
		return true;
	}

}
